using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WeddingDBTableAdapters;

public partial class admin_default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
		 if (!IsPostBack)
		 {
			 int? totalHits = 0;
			 double? totalRSVP = 0.0;
			 HitsTableAdapter hitAdptr = new HitsTableAdapter();
			 RSVPTableAdapter rsvpAdptr = new RSVPTableAdapter();

			 totalHits = hitAdptr.GetTotalHits();
			 totalRSVP = rsvpAdptr.GetTotalAttending();

			 if (totalHits == null)
			 {
				 totalHits = 0;
			 }

			 if (totalRSVP == null)
			 {
				 totalRSVP = 0.0;
			 }

			 lblHits.Text = totalHits.ToString();
			 lblRSVPTotal.Text = totalRSVP.ToString();
		 }
    }
}
